function valCedula(val, e) {
	var filter;
	var keynum;
	

	filter = /^[0-9]*$/;
	
	keynum = (document.all) ? e.keyCode : e.which; 
    
	if (keynum == 0 || keynum == 8)
		return true;
	
	keychar = String.fromCharCode(keynum);

	return filter.test(val+keychar);
}